runOnStartup(async runtime => {
    runtime.addEventListener("tick", () => tick())
    runtime.getLayout("MainLevel").addEventListener("afterlayoutstart", () => init())
});
function tick() {
    if (runtime.layout.name != "MainLevel") return;
}
function init() {
    uiPlayerHeart_Spwn.spwn()
}
globalThis.uiPlayerHeart_Spwn = {
    spwn: function () {
        let StartX = 12
        let StartY = 11
        let Xoffset = 34 - 12
        for (let i = 0; i < playerSelfdata.playerHeart; i++) {
            /**@type {IObjectClass} */
            let uiHeartClass = runtime.objects.UI_playerHeart
            let newHeart = uiHeartClass.createInstance("ScoreTimeHUD", StartX + i * Xoffset, StartY, true)
        }
    }
}
export default uiPlayerHeart_Spwn